﻿using System;
using System.Collections.Generic;
using System.Text;

namespace JacketEmblem.Crane.Dialogs
{
    public class JavaScriptConfirmDialog : JavaScriptAlertDialog
    {
        private bool confirmed;

        public JavaScriptConfirmDialog(string message)
            : base(message)
        {
        }

        public bool IsConfirmed
        {
            get { return confirmed; }
        }

        public override void ClickOK()
        {
            confirmed = true;
            base.ClickOK();
        }

        public void ClickCancel()
        {
            confirmed = false;
            OnDialogDismissed(new EventArgs());
        }
    }
}
